package com.emellend.api.animation;

import com.emellend.api.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
/**
 * 本类的功能是将EditText输入框左右摇晃，实现震动效果
 * @author emellend
 *
 */
public class Animation1 extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.animation_1);
		Button login = (Button) findViewById(R.id.login);
		login.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Animation shake=AnimationUtils.loadAnimation(Animation1.this, R.anim.shake);
				findViewById(R.id.pw).startAnimation(shake);
			}
		});
		
	}
}
